﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="Filters.aspx.cs" Inherits="EXAM.Admin.Page_Admin.Filters"  %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="UsrControl/QueryFilterMenu.ascx" TagName="QueryFilterMenu" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlacebody" runat="server">
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="True" ReloadOnShow="true"
        ShowContentDuringLoad="False" SkinID="Rad_Skin_Main" Height="500px" Width="900px"
        Overlay="True" Style="z-index: 10000" PreserveClientState="False" Animation="Resize"
        VisibleStatusbar="False">
    </telerik:RadWindowManager>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

        <script type="text/javascript">
        
        
        
        </script>

    </telerik:RadCodeBlock>
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
            <td align="center" class="formTitle">
                Report -
                <asp:Literal ID="lbTitle" runat="server"></asp:Literal>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbErr" runat="server" ForeColor="Red"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <uc1:QueryFilterMenu ID="QueryFilterMenu1" runat="server" />
            </td>
        </tr>
        <tr>
            <td>
                <telerik:RadGrid ID="dgvList" runat="server" AutoGenerateColumns="False" GridLines="None"
                    Skin="Office2007" OnItemCommand="dgvList_ItemCommand" OnNeedDataSource="dgvList_NeedDataSource"
                    DataMember="Filters" OnUpdateCommand="dgvList_UpdateCommand">
                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                    </HeaderContextMenu>
                    <ClientSettings>
                    </ClientSettings>
                    <MasterTableView DataKeyNames="Code" DataMember="Filters">
                        <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton">
                                <ItemStyle CssClass="MyImageButton" />
                            </telerik:GridEditCommandColumn>
                            <telerik:GridBoundColumn DataField="Code" FilterControlAltText="Filter column1 column"
                                HeaderText="Code" UniqueName="column1" ReadOnly="True" Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Description" FilterControlAltText="Filter column2 column"
                                HeaderText="Name" UniqueName="column2" ReadOnly="True">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn FilterControlAltText="Filter column3 column" HeaderText="From"
                                DataField="FilterFrom" UniqueName="column3">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn FilterControlAltText="Filter column column" HeaderText="To"
                                DataField="FilterTo" UniqueName="column4">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <EditFormSettings UserControlName="UsrControl/ucSetValueFilter.ascx" EditFormType="WebUserControl">
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                </telerik:RadGrid>
                <asp:ObjectDataSource ID="objDS" runat="server"></asp:ObjectDataSource>
            </td>
        </tr>
    </table>
    <asp:HiddenField ID="hdQDCode" runat="server" />
    <asp:HiddenField ID="hdQuery" runat="server" />
    <asp:HiddenField ID="hdFrom" runat="server" />
    <asp:HiddenField ID="hdTo" runat="server" />
    <asp:HiddenField ID="hdFileName" runat="server" />
    <asp:HiddenField ID="hdFlagReport" runat="server" />
    <asp:HiddenField ID="hdTitle" runat="server" />
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="LoadSQLBuilderFromDataBase"
        TypeName="QueryBuilder.SQLBuilder">
        <SelectParameters>
            <asp:ControlParameter ControlID="hdQDCode" DefaultValue="0" Name="qd_id" PropertyName="Value"
                Type="String" />
            <asp:Parameter DefaultValue="EXA" Name="database" Type="String" />
            <asp:Parameter DefaultValue="A" Name="table" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
